package com.darrenchan.leetcode;

/**
 * @Desc
 * @Author chenchi03
 * @CreateTime 2019-11-26 21:55
 */
public class Q58 {
    public int lengthOfLastWord(String s) {
        return s.trim().split(" ")[s.trim().split(" ").length - 1].length();
    }

    public static void main(String[] args) {
        System.out.println(new Q58().lengthOfLastWord("hello   world "));
    }
}
